﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TaskManager.Data;

using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;

namespace TaskManager.Views
{
    public partial class NavigationPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            using (IUnityContainer container = new UnityContainer())
            {
                container.LoadConfiguration();
                ISprintRepository sprintRepository = container.Resolve<ISprintRepository>();

                this.sprintRepeater.DataSource = sprintRepository.GetSprints();
                this.sprintRepeater.DataBind();

                this.developerRepeater.DataSource = sprintRepository.GetDevelopers();
                this.developerRepeater.DataBind();
            }
        }
    }
}